package business.action;

import java.util.List;

import model.TUser;
import business.dao.UserDAO;
import business.factory.DAOFactory;

import com.opensymphony.xwork2.ActionSupport;

public class EditAction extends BaseAction {
	
	private String userid;
	private String errorsText;
	private String backurl;
	
	
	public String getUserid() {
		return userid;
	}


	public void setUserid(String userid) {
		this.userid = userid;
	}


	public String getErrorsText() {
		return errorsText;
	}


	public String getBackurl() {
		return backurl;
	}


	/**
	 * @return
	 */
	public String execute() {
		backurl="success.jsp";
		UserDAO tdao=new DAOFactory().getUserDAO();
	TUser user =tdao.getTUserById(userid);
	    session.setAttribute("user", user);
	return SUCCESS;}
}